package com.dianping.cat.home.dal.report;

import java.util.List;
import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class MetricScreenDao
  extends AbstractDao {
/*  11 */   public MetricScreen createLocal() { return new MetricScreen(); }





/*  17 */   public int deleteByPK(MetricScreen proto) throws DalException { return getQueryEngine().deleteSingle(MetricScreenEntity.DELETE_BY_PK, proto); }





/*  23 */   public int deleteByName(MetricScreen proto) throws DalException { return getQueryEngine().deleteSingle(MetricScreenEntity.DELETE_BY_NAME, proto); }





  public int deleteByNameGraph(MetricScreen proto) throws DalException { return getQueryEngine().deleteSingle(MetricScreenEntity.DELETE_BY_NAME_GRAPH, proto); }




  public List<MetricScreen> findAll(Readset<MetricScreen> readset) throws DalException {
/*  35 */     MetricScreen proto = new MetricScreen();

/*  37 */     return getQueryEngine().queryMultiple(MetricScreenEntity.FIND_ALL, proto, readset);
  }






  public List<MetricScreen> findByName(String name, Readset<MetricScreen> readset) throws DalException {
/*  46 */     MetricScreen proto = new MetricScreen();

/*  48 */     proto.setName(name);

/*  50 */     return getQueryEngine().queryMultiple(MetricScreenEntity.FIND_BY_NAME, proto, readset);
  }






  public MetricScreen findByPK(int keyId, Readset<MetricScreen> readset) throws DalException {
/*  59 */     MetricScreen proto = new MetricScreen();

/*  61 */     proto.setKeyId(keyId);

/*  63 */     return (MetricScreen)getQueryEngine().querySingle(MetricScreenEntity.FIND_BY_PK, proto, readset);
  }






  public MetricScreen findByNameGraph(String name, String graphName, Readset<MetricScreen> readset) throws DalException {
/*  72 */     MetricScreen proto = new MetricScreen();

/*  74 */     proto.setName(name);
/*  75 */     proto.setGraphName(graphName);

/*  77 */     return (MetricScreen)getQueryEngine().querySingle(MetricScreenEntity.FIND_BY_NAME_GRAPH, proto, readset);
  }








/*  87 */   protected Class<?>[] getEntityClasses() { return new Class[] { MetricScreenEntity.class }; }



/*  91 */   public int insert(MetricScreen proto) throws DalException { return getQueryEngine().insertSingle(MetricScreenEntity.INSERT, proto); }





/*  97 */   public int insertOrUpdateByNameGraph(MetricScreen proto) throws DalException { return getQueryEngine().insertSingle(MetricScreenEntity.INSERT_OR_UPDATE_BY_NAME_GRAPH, proto); }





/* 103 */   public int updateByPK(MetricScreen proto, Updateset<MetricScreen> updateset) throws DalException { return getQueryEngine().updateSingle(MetricScreenEntity.UPDATE_BY_PK, proto, updateset); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/dal/report/MetricScreenDao.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */